package com.man.springmvc.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.man.springmvc.entity.User;

@Controller
public class JsonController {
	
	@RequestMapping(value="/json")
	@ResponseBody
	public Object json(){
		List<User> userlist=new ArrayList<User>();
		userlist.add(new User("xiaoming",22));
		userlist.add(new User("xiaohua",23));
		return userlist;
	}
}
